package com.wetsoft.base

import akka.actor.Actor

class MyActor extends Actor{

  def act(){
    while(true){
      receive
    }
  }
  override def receive: Receive = {
    case x:String => println("save String ="+ x)
    case x:Int => println("save Int")
    case _ => println("save default")
  }
}

object ActorTest {

  def main(args: Array[String]): Unit = {
    //创建actor的消息接收和传递
    val actor =new MyActor()
    //启动
    //发送消息写法
//    actor.st

  }

}
